//
//  ZCSListenNewsModel.m
//  聆听FM
//
//  Created by dllo on 16/6/8.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import "ZCSListenNewsModel.h"
#import "ZCSFocusImagesModel.h"
#import "ZCSNewsTagsModel.h"

@implementation ZCSListenNewsModel

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super initWithDic:dic];
    if (self) {
        self.cateModel = [[ZCSNewsCateModel alloc] initWithDic:_categoryContents];
        //轮播图
        self.focuImageArray = [NSMutableArray array];
        for (NSDictionary *dic in _focusImages[@"list"]) {            
            ZCSFocusImagesModel *model = [[ZCSFocusImagesModel alloc] initWithDic:dic];
            if (model.type == 2 || model.type == 3 || model.type == 9) {
                [self.focuImageArray addObject:model];
            }
        }
        self.tagsArray = [NSMutableArray array];
        for (NSDictionary *dic in _tags[@"list"]) {
            ZCSNewsTagsModel *tagModel = [[ZCSNewsTagsModel alloc] initWithDic:dic];
            [self.tagsArray addObject:tagModel];
        }
    }
    return self;
}
@end
